<style>
	/* sub-popmenus*/
	/*
	.popmenu ul {
	padding: 0px;
	margin: 0px;
	display: block;
	display: inline;
	position: absolute;
	background:url(<?php echo Yii::app()->baseUrl."/images/webgl/head/StripePattern.png"?>) repeat;

	}*/
	.popmenu ul li {
	display: block;
	margin: 5px 2px;
	padding: 5px 0px;
	cursor: pointer;
	border-top: dotted 1px #606060;
	list-style-type: none;
	color: #000000;
	}
	.popmenu ul li:first-child {
	border-top: none;
	}
	.popmenu ul li a {
	display: block;
	color: #000000;

	}
	.popmenu ul li a:hover {
	color: #990000;
	}

	.opmenu,.wallmenu{
	width:100%;
	}
</style>
<script>
$(function() {
		
$(".dockitem").fancybox();
        /*
        $('#facilityView').draggable({
            cursor : 'crosshair',
            handle : ".draghandle",
            containment : '.stage',
            scroll : false
        });
        */
		$("#move").click(function(){
	      $('canvas').on('mousemove', function(event) {
	               /*
	                var mouse2D = new THREE.Vector3( 0, 0, 0.5 );
	                mouse2D.x = (event.clientX - RoomUtil.OFFSET_SIZE.x)/ ($('canvas').width()) * 2 - 1;
	                mouse2D.y = -((event.clientY - RoomUtil.OFFSET_SIZE.y) / ($('canvas').height())) * 2 + 1;
	                */
	                build.moveFacility(event);
	                
	                $('canvas').off('click');
	                $('canvas').click(function(event){
	                  $('canvas').off('mousemove');
	                  $('canvas').on('click',function(event){
	                  build.getFacility(event);
	                  });
	                });
	         });
	       });
		$("#remove").click(function(){
			build.removeFacility();
			$('#facilityPanel').empty();
		});
		
		$("#rotate").click(function(){
		$('canvas').off('click').off('mousedown').off('mousemove').off('mouseup').on('mousedown',function(event){
		   build.rotateFacility(event);
		});
		 
		});
		
		$("#turn").click(function(){
        lightArray=build.turnOffAll(lightArray);
        build.turnOn(lightArray);
    });
    /*
        $('#facilityShow').draggable({
            cursor : 'crosshair',
            handle : ".draghandle",
            containment : '.stage',
            scroll : false
        });
        */
});
</script>
<!--<link rel="stylesheet" type="text/css" href="<?php echo Yii::app() -> request -> baseUrl;?>/css/colorpicker2/farbtastic.css" />-->
  <div id="facilityView" class='panel' >
    <div class="panelbar">
      物体
    </div>
  <ul id='roomStyleList' style="margin:10px; line-height:30px;">    
    <li class='prop' id='move'>移动</li>
    <li class='prop' id='rotate'>旋转</li>
    <li class='prop' id='turn'>开灯</li>
    <li class='prop' id='remove'>删除</li>
    <li class='prop' id="goodsName"><?php echo $hostInfo -> name;?></li>
    <li class='prop' id="description"><?php echo $hostInfo -> description;?></li>
  </ul>
  </div>